home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Misc / NewFile / Source / Protos.h < prev    next >
Text File  |  1992-11-11  |  3KB  |  106 lines

  1.  
  2. /* Generated by Interface Builder */
  3.  
  4. /*
  5.     --------------------------------------------------------
  6. Protos maintains a list of filetypes. Its interface allows types to be defined or deleted. 
  7.     --------------------------------------------------------    
  8. */
  9.  
  10. #import <objc/Object.h>
  11. #import <stdio.h>
  12.  
  13. @interface Protos:Object
  14. {
  15.     id    typename;
  16.     id    editor;
  17.     id    pathname;
  18.     id    typematrix;
  19.     id    defaultopen;
  20.     id    list;
  21.     id    window;
  22.     id    main;
  23.     id    remove;
  24.     id    openineditor;
  25.     id    openinws;
  26. }
  27.  
  28. //     --------------------------------------------------------
  29. // Abstraction of the interface.
  30. - (char *)typename;
  31. - settypename:(char *)atypename;
  32. - (char *)pathname;
  33. - setpathname:(char *)apathname;
  34. - (char *)editor;
  35. - seteditor:(char *)aneditor;
  36. - (int)defaultopen;
  37. - setdefaultopen:(int)open;
  38.  
  39. // Fill in the interface for proto.
  40. // If proto is nil, then fill in blanks.
  41. - showtypedetails:proto;
  42.  
  43. // Load interface and initialize.
  44. - loadnib;
  45.  
  46. // Create a proto from the entries in the interface.
  47. - formproto;
  48.  
  49. //     --------------------------------------------------------
  50. // Properties of the proto whose name is currently selected in the list.
  51. - selected;
  52. - (char *)selectedname;
  53. - (char *)selectedpathname;
  54. - (char *)selectededitor;
  55.  
  56. //     --------------------------------------------------------
  57. // Respond to the interface.
  58.  
  59. // Display the interface.
  60.  
  61. - showwindow:sender;
  62. - openineditor:sender;
  63. - openinworkspace:sender;
  64. - remove:sender;
  65. - modify:sender;
  66.  
  67. // Called when user clicks on entry in type list.
  68. - showtype:sender;
  69.  
  70. //     --------------------------------------------------------
  71. // The list of proto's. The list is ordered alphabetically.
  72.  
  73. // The list.
  74. - protoslist;
  75.  
  76. // Return the proto whose typename is name.
  77. - protoforname:(char *)name;
  78.  
  79. /*
  80. Return the position in the list of the proto with typename name.
  81. If no proto has that name, return the position at which a new entry with that name should go.
  82. */
  83. - (int)findposinlist:(char *)typename;
  84.  
  85. // The proto at position pos.
  86. - protoatpos:(int)pos;
  87.  
  88.  
  89. /*
  90. If a proto with the name typename as proto is already in the list, replace that entry (destroying the old entry), otherwise add a new entry.
  91. Return the position of the added/modified entry.
  92.  
  93. The interface is not updated: have to avoid the interface in this routine since the list is loaded and accessed on startup, and the interface is not loaded until it is required.
  94. */
  95. - (int)addtolist:proto;
  96.  
  97. // Remove the proto with typename name and update the interface.
  98. - (int)removefromlist:(char *)typename;
  99.  
  100. // Load the list.
  101. - readprotos:(FILE *)fp;
  102.  
  103. // Store the list.
  104. - writeprotos:(FILE *)fp;
  105. @end
  106.